package com.webinsky.article.domain;

public enum MisArticleMediaType {
	Text(1), Image(2), Video(3);
	
	private int type;
	
	private MisArticleMediaType(int type){
		this.type = type;
	}
	
	public int getType(){
		return type; 
	}
	
	public static MisArticleMediaType parse(int type){
		for ( MisArticleMediaType mediaType : MisArticleMediaType.values() ){
			if ( mediaType.getType() == type ){
				return mediaType;
			}
		}
		return null;
	}
}
